package com.ruoyi.site.service.impl;

import java.util.List;

import com.ruoyi.site.domain.Tracks;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.site.mapper.MoodsMapper;
import com.ruoyi.site.domain.Moods;
import com.ruoyi.site.service.IMoodsService;

/**
 * 音乐情绪Service业务层处理
 * 
 * @author chuckeytang
 * @date 2025-08-17
 */
@Service
public class MoodsServiceImpl implements IMoodsService 
{
    @Autowired
    private MoodsMapper moodsMapper;

    /**
     * 查询音乐情绪
     * 
     * @param moodId 音乐情绪主键
     * @return 音乐情绪
     */
    @Override
    public Moods selectMoodsByMoodId(Long moodId)
    {
        return moodsMapper.selectMoodsByMoodId(moodId);
    }

    /**
     * 查询音乐情绪列表
     * 
     * @param moods 音乐情绪
     * @return 音乐情绪
     */
    @Override
    public List<Moods> selectMoodsList(Moods moods)
    {
        return moodsMapper.selectMoodsList(moods);
    }

    /**
     * 新增音乐情绪
     * 
     * @param moods 音乐情绪
     * @return 结果
     */
    @Override
    public int insertMoods(Moods moods)
    {
        return moodsMapper.insertMoods(moods);
    }

    /**
     * 修改音乐情绪
     * 
     * @param moods 音乐情绪
     * @return 结果
     */
    @Override
    public int updateMoods(Moods moods)
    {
        return moodsMapper.updateMoods(moods);
    }

    /**
     * 批量删除音乐情绪
     * 
     * @param moodIds 需要删除的音乐情绪主键
     * @return 结果
     */
    @Override
    public int deleteMoodsByMoodIds(Long[] moodIds)
    {
        return moodsMapper.deleteMoodsByMoodIds(moodIds);
    }

    /**
     * 删除音乐情绪信息
     * 
     * @param moodId 音乐情绪主键
     * @return 结果
     */
    @Override
    public int deleteMoodsByMoodId(Long moodId)
    {
        return moodsMapper.deleteMoodsByMoodId(moodId);
    }

    @Override
    public List<Tracks> selectTracksByMoodId(Long moodId)
    {
        return moodsMapper.selectTracksByMoodId(moodId);
    }
}
